package cn.easybuy.dao;

import cn.easybuy.entity.*;

import java.sql.SQLException;
import java.util.List;

public interface OrderDAO {

    // 根据用户id查询订单
    List<Order> SelOrder(int id) throws SQLException;

    // 查询当前用户所有订单详情
    List<OrderShow> SelOrderPar(String serialNumber) throws SQLException;

    // 分页查询
//    PageInfo<Order> listPage(int id , PageInfo<Order> pageInfo) throws SQLException;

    // 查询地址
    List<UserAddress> SelUserAddress(int id) throws SQLException;

    // 添加地址
    int AddUserAddress(UserAddress userAddress) throws SQLException;

    // 添加订单
    int AddOrder(Order order) throws SQLException;

    // 查询订单号
    int selOrder(String serialNumber) throws SQLException;

    // 添加订单详情
    int AddDatail(OrderDetail orderDetail) throws SQLException;
}
